package com.bee2c.osgi.invoke.service.sub;

import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;

/**
 * 调用商旅OSGI服务
 * @author Administrator
 *
 */
@Service
public class BeeOsgiInterfaceInvoke {

	public Object invokeBeeosgi(String bcId, String url, JSONObject paraJson) {
		BcAdapter adapter = HessionInvokeUtils.getHessianProxy(BcAdapter.class, 30000L, url);
		Object result = adapter.invoke(bcId, "", paraJson);
		if (result == null) {
			return null;
		}
		return JSONObject.toJSON(result);
	}
}
